home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Risc World 3
/
Risc World 3.iso
/
SOFTWARE
/
ISSUE4
/
ZAP
/
!Zap
/
Code
/
Extensions
/
LineEditor
/
WhatsNew
< prev
Wrap
Text File
|
2002-11-03
|
8KB
|
212 lines
What's new?
===========
Since 2.65, which was bundled with the !Zap release 1.20:
2.66:
Under RISC OS 3.5, a dynamic area is used for workspace, rather than the
RMA. This should help prevent RMA fragmentation amongst other things.
2.67 (bundled with !Zap release 1.30):
Bug fix -- routine which redraws a line on Ctrl-L, etc now repositions cursor
after redraw. Code *was* there, but a missing 'S' meant that it didn't fire
ever.
Added two bindable commands:
SHOWCOMP: This list all completions matching a wildcarded filename. Files
which are regarded as executable (Obey, Absolute, BASIC, Utility and Command
filetypes) are marked with a trailing "*" and directories (and application
directories) with a trailing ".". Since neither "*" nor "." are valid in
leafnames, this shouldn't cause any ambiguities. This is bound to Ctrl-C in
the default map. In tcsh it is on Ctrl-D, which also does "delete right" if
there are characters to the right, or lists completions if you're at the end
of the line. Or logs you out if you haven't typed anything :(. LineEditor is
more versatile, so Ctrl-D isn't really a good choice.
COMPLETESHOW: This does a tcsh-like completion (i.e. complete as far as all
matches are common) and then does SHOWCOMP if there is more than one
completion. I have rebound TAB to this instead of COMPLETE in the default
key map.
File lists mark directories/apps with a trailing '.' and executables (i.e.
Command, BASIC, Utility, Absolute, Obey) with a trailing '*'.
The completion code will now turn on the hourglass if the completion takes a
while (e.g. completing filenames on a freshly inserted floppy disc).
The completion code now correctly handles filenames containing temporary
filing systems and no sub-directories (for example "-adfs-foo*").
Added FILEROPEN and FILERCLOSE hackily (currently disabled). These do
a Filer_OpenDir/Filer_CloseDir on the directory currently being completed.
Removed a few dead code instructions (ho hum).
Fixed a couple of problems handling addresses with top bit set (hopefully).
Now redisplay prompt in redrawline too, using Mark Wooding's code to print
CLI$Prompt.
Removed *Help Editor text -- will be replaced by an option to "bindkey" at
some point.
Removed all use of CMOS RAM, and switched to using a SWI call, which allows
more configuration options. See file "ConfigOpts" for details.
Added option to not remove identical lines from history.
Added option to set maximum line length to store in history.
Various internal tweaks and fettles
Buffer API added for use by external programs (e.g. !Zap). If you're
especially interested, contact me and I'll send you the API documentation as
it stands. I'll tidy up and release it with the next release.
Fixed bug which meant unexpanded leading tildes were never stripped.
Added ! expansion like csh/tcsh/bash. !! expands to the last line, !<n>
gives history line n, !-<n> gives the n-th most recent. Currently this
is only applied if the ! is at the start of the line.
~ expansion and ! expansion can be turned off if desired.
Cursor is now restored by uncopy.
Copy action now toggles as intended.
^ replacement added ("^flie^file" will replace the first match for "flie"
with "file" in the previous line in the history and "^flie^file^extra" will
also append "extra"). This is like in various UNIX shells.
2.68:
Fixed bug which could cause a crash if LineEditor is started with parameters.
2.69:
Added System variable completion (e.g. type <Sys and press TAB). There's a
known niggle at present, which is that LineEditor doesn't like '.' when
parsing for system variable names (such as in "Alias$.") so 4DOS-style
completion won't step past them. The fix is more involved than it might
seem, so I've left it for the next release.
Extended key codes are now disabled if a *Exec file is being processed (check
fails in TaskWindows for some reason (on Risc PC anyway)).
scSpace now produces correct keycode value (was producing code for cSpace).
Bug fix for 4DOS completion (used to rely on free + malloc working).
Beeps are now produced by calling SWI Sound_Control so work even with
poor TaskWindow servers which ignore VDU7 (such as !Edit).
Temporary fix for problem with restarting LineEditor while !Zap is running:
Now refuses to shut down if any client buffers have been created but not
destroyed. The full fix is to take an optional task handle and free the
client buffer if that task quits.
Added workaround for ImageFSFix bug (it "loses" VS on some OS_GBPB errors).
Fixed bug in "previous completion" code which could cause a very long loop
which couldn't be broken out of (very long == possibly several days).
2.70:
Unknown SWIs in LineEditor SWI chunk no longer hang machine (bug in PRM
sample code).
Fixed completion code so system variable completions with '.' in work.
Added filing system name completion (e.g. "-A" [TAB] -> "-ADFS-").
Add trailing dots now works for 4DOS completion.
4DOS completion of system variables adds trailing '>' (and for FS adds '-').
LineEditor_CreateBuffer extended to allow task handle to be passed in, and
the buffer is freed automatically if that task quits.
List completions of system variable adds 'M' for macro, 'n' for number,
'C' for code.
List completions of filing system adds 'r' for read-only FS (not RO2).
You can now safely quit a TaskWindow from the Task Manager (on RISC OS 3.1,
used to not work and sometimes could even hang machine).
2.71:
Added *SaveHistory/*LoadHistory. These save/load the history buffer as a
text file (most recently used buffer if you use local buffers). LoadHistory
passes lines through the usual min/max length checks, although currently
lines over 255 characters are ignored regardless. With global history, add
"*LoadHistory somefile" to your !Boot and "*SaveHistory somefile" to a
shutdown script (assuming you have one) and your history will persist over
shutdowns. This will be made simpler in a future release.
Fixed bug which could cause hang if history buffer filled up.
*Recall with local history now only reports current buffer (please complain
if you prefer the old behaviour).
Minor internal tweak to cursor code.
2.72:
Fixed the swapchars action (bound to Ctrl-T by default). Ironically, the
problem was that I'd transposed the arguments of a MOV instruction.
2.73:
Added BASH-like "don't store lines with leading spaces" option.
Command completion added.
Added SWI LineEditor_ReadInfo for !Zap.
Bug fix: *LoadHistory now creates an instance if there isn't one already -
previously it would be ignored if executed before any call to OS_ReadLine.
Added FILEROPEN action (bound by default to Ctrl-O) which opens a filer
window on the directory name under the cursor. If the name isn't valid,
LineEditor beeps.
Added hooks to allow colouring of prompt and completions (only really useful
in single-tasking mode). You set the colours like so:
Prompt: *Set CLI$Prompt <17><1>*
Edit: *Set LineEditor$Edit <17><2>
Completion List: *Set LineEditor$List <17><3>
Type flag in list: *Set LineEditor$Type <17><4>
Output from command: *Set LineEditor$Output <17><5>
Tip for those with too much free time - see what you can do by using a code
variable...
2.74 (Darren Salt):
Implemented OS_ReadLine's two flags in R0.
Added SWI LineEditor_ReadLine for general use by CLI programs.
The SWIs now return an error when given an invalid buffer ID.
Recognises A4 and PC-AT keyboards, specifically '\' to the left of 'Z'.
Added support for the extra W!nd*w$ keys. The keycodes are &168 (left logo),
&169 (menu) and &16A (right logo); add 4 for Shift and 16 for Ctrl.
Page Up and Page Down are separately bindable. If left unbound, then the
definitions used for Up and Down are used (with adjustments for Shift). The
keycodes are &1CE (down) and &1CF (up); add &10 for Shift and &20 for Ctrl.
2.75 (Darren Salt):
Hopefully made the module 26/32 neutral...
Shifted the init string from RMRun to RMLoad/RMReinit.
Uses territory-specific tables for case-insensitive comparison.